Use explicit values for constraint strength
authorEmmanuele Bassi <ebassi@gnome.org>
Mon, 1 Jul 2019 11:39:24 +0000 (12:39 +0100)
committerEmmanuele Bassi <ebassi@gnome.org>
Mon, 1 Jul 2019 11:39:24 +0000 (12:39 +0100)
commit4dd1de41293cdb5ca06d64136ab5549794f1cac3
tree0cb179008372f1ee65f6d3f4e1d568e2fd66795d
parent48e6cd42559558956350620e9deb744219a1bd04
Use explicit values for constraint strength

Instead of playing games with mapping negative symbolic values to
positive ones, let's use the appropriate constants everywhere. This
allows us to use:

        GTK_CONSTRAINT_STRENGTH_WEAK * 2

Or

        GTK_CONSTRAINT_STRENGTH_STRONG + 1

In code using the public API.

We also store the strength values as integers, so we can compare them
properly, and only turn them into doubles when they are inserted into
the solver, just like every other variable.
gtk/gtkconstraint.c
gtk/gtkconstraintguide.c
gtk/gtkconstraintlayout.c
gtk/gtkconstraintprivate.h
gtk/gtkconstraintsolver.c
gtk/gtkconstraintsolverprivate.h
gtk/gtkenums.h
testsuite/gtk/constraint-solver.c